Skip to content

Make transfer/primaries conversion opt-in in reformat, fixes #2208#2336

Merged
WyattBlue merged 1 commit into
mainfrom
patch
Jul 1, 2026
Merged

Make transfer/primaries conversion opt-in in reformat, fixes #2208#2336
WyattBlue merged 1 commit into
mainfrom
patch

Conversation

@WyattBlue

Copy link
Copy Markdown
Member

sws_scale_frame (used since 17.0.0) validates color_trc/color_primaries and rejects RESERVED and other unsupported values (e.g. LOG) with EOPNOTSUPP, regressing plain reformat/to_ndarray to rgb24 on VP9 and NVDEC frames. The pre-17.0 sws_scale ignored these fields.

Neutralize color_trc/color_primaries to UNSPECIFIED for the scale unless a destination value is explicitly requested, while preserving the source's tags on the returned frame. The YUV->RGB matrix and explicit conversions are unaffected.

sws_scale_frame (used since 17.0.0) validates color_trc/color_primaries and
rejects RESERVED and other unsupported values (e.g. LOG) with EOPNOTSUPP,
regressing plain reformat/to_ndarray to rgb24 on VP9 and NVDEC frames. The
pre-17.0 sws_scale ignored these fields.

Neutralize color_trc/color_primaries to UNSPECIFIED for the scale unless a
destination value is explicitly requested, while preserving the source's tags
on the returned frame. The YUV->RGB matrix and explicit conversions are
unaffected.
@WyattBlue WyattBlue merged commit 52b8f6b into main Jul 1, 2026
8 checks passed
@WyattBlue WyattBlue deleted the patch branch July 1, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant